package com.lq.principle.singleresponsibility;

class SingleResponsebility2 {
    public static void main(String[] args) {
        Ve2 v=new Ve2();
        Ve3 e=new Ve3();
        v.run("🚴");
        e.run("轮船");
    }
}
//类的单一职责  如果方法少可以考虑方法的单一职责
class Ve2{
    public void run (String v){
        System.out.println(v+"在陆地上跑");
    }
}
class Ve3{
    public void run (String v){
        System.out.println(v+"在海洋上跑");
    }
}
